<?php if(!defined('IN_PISCES')){exit('Access Denied.');}?>
<link href="{$this->data['baseurl']}css/tzm/bbs.css" rev="stylesheet" rel="stylesheet" type="text/css" media="screen">
<script language="javascript" src="{$this->data['baseurl']}js/jquery/jquery.js"></script>
<script language="javascript" src="{$this->data['baseurl']}js/jquery/form.js"></script>
<script language="javascript" src="{$this->data['baseurl']}js/utils.js"></script>
<script type="text/javascript">
var successFun=function(res){
if(res.code==200){
	document.location	= res.data.forward;
}else{
	//alert('出错了，请重新尝试！');
}
}
$(document).ready(function() { 
	var updateOptions	= {dataType:'json',error:doError,success:doSuccess}
    $('#form').ajaxForm(updateOptions); 
}); 
</script>

{if !empty($this->data['adList']) && !empty($this->data['adList'][14])} 
<!--{loop $this->data['adList'][14] $mk $item}-->
<div class="adbox mb5"> {$item['code']} </div>
<!--{/loop}-->
{/if}
<div id="container">
  <div class="clear"></div>
  <div id="container_body"> 
    <!--左边哦-->
    <div id="container_l"> {if !empty($this->data['postList'])} 
      <!--{loop $this->data['postList'] $mk $item}--> 
      {if $item['type']==1} 
      <div id="container_mainbox">
        <div class="path">
          <div class="dao"> <a href="{$this->data['baseurl']}">首页</a> &gt; <a href="{url('Post','List')}">分享中心</a> &gt; {$item['title']} </div>
        </div>
        <div class="clear"></div>
        <div class="content_box">
          <div class="mainbox">
            <div class="top">
              <div class="top_l"> <a target="_blank" href="{url('User','Index')}"><img src="{if $item['user']['logo']}{$item['user']['logo']}{else}{$this->data['baseurl']}images/avatar-120.png{/if}"></a> </div>
              <div class="top_r"> <span><a target="_blank" href="{url('User','Index')}">{$item['username']}</a></span><span></span> <span id="profit-follow-30105" class="profit-follow-add">{if $item['visit_num']>50}<span class="status"><img alt="热门帖" src="{$this->data['baseurl']}images/post_hot.png"></span>{/if} </span> </div>
              <div class="clear"></div>
            </div>
            <div class="title">
              <h1>{$item['title']}</h1>
              <span class="span_fav_b" id="span_fav">{if $this->data['user']['id'] && $this->data['user']['id']==$item['user_id']}&nbsp;&nbsp;<a href="{url('Post','Edit',array('id'=>$item['id']))}" class="op">[编辑]</a>{/if}</span> </div>
            <div class="clear"></div>
          </div>
          <div class="share" >
            <pre class="pdTxtEditorPre">{$item['content']['content']}</pre>
            <div class="topic_neighbor">
              <div class="fl"></div>
              <div class="fl">本文关键字:{if !empty($item['tags'])}<!--{loop $item['tags'] $tag}--><a href="{url('Post','List',array('tag'=>$tag['id']))}">{$tag['name']}</a><!--{/loop}-->{else}{/if}</div>
            </div>
            <div class="bottom_b">
              <div class="new_reply"><a href="#reply_txtarea">围观<em>({$item['visit_num']})</em></a></div>
              分享到: <a class="kaixin share-md" href="http://www.kaixin001.com/repaste/share.php?rurl=http://{$this->data['domain']}{url('Post','View',array('id'=>$item['id']))}&amp;rcontent={urlencode($item['title'])}&amp;rtitle={urlencode($item['title'])}" target="_blank" kind="kb.activity.share.link2">开心</a><a kind="kb.activity.share.link3" class="renren share-md" href="http://share.renren.com/share/buttonshare.do?link=http://{$this->data['domain']}{url('Post','View',array('id'=>$item['id']))}&amp;title={urlencode($item['title'])}" target="_blank" id="">人人</a><a kind="kb.activity.share.link5" class="douban share-md" href="http://www.douban.com/recommend/?url=http://{$this->data['domain']}{url('Post','View',array('id'=>$item['id']))}&amp;title={urlencode($item['title'])}" target="_blank">豆瓣</a><a kind="kb.activity.share.link6" class="sina share-md" href="http://v.t.sina.com.cn/share/share.php?url=http://{$this->data['domain']}{url('Post','View',array('id'=>$item['id']))}&amp;title={urlencode($item['title'])}" target="_blank" style="margin-right: 0pt;">新浪微博</a></div>
          </div>
        </div>
      </div>
      <div class="page-sep">
        <div class="pagination"> {$this->data['pages']}</div>
      </div>
      {else}
      {if $item['type']==2} 
      <div id="container_mainbox">
        <div class="path">
          <div class="dao"> <a href="{$this->data['baseurl']}">首页</a> &gt; <a href="{url('Post','List')}">分享中心</a> &gt; {$item['title']} </div>
        </div>
        <div class="clear"></div>
        <div class="content_box">
          <div class="mainbox">
            <div class="top">
              <div class="top_l"> <a target="_blank" href="{url('User','Index')}"><img src="{if $item['user']['logo']}{$item['user']['logo']}{else}{$this->data['baseurl']}images/avatar-120.png{/if}"></a> </div>
              <div class="top_r"> <span><a target="_blank" href="{url('User','Index')}">{$item['username']}</a></span><span></span> <span id="profit-follow-30105" class="profit-follow-add">{if $item['visit_num']>50}<span class="status"><img alt="热门帖" src="{$this->data['baseurl']}images/post_hot.png"></span>{/if} </span> </div>
              <div class="clear"></div>
            </div>
            <div class="title">
              <h1>{$item['title']}</h1>
              <span class="span_fav_b" id="span_fav">{if $this->data['user']['id'] && $this->data['user']['id']==$item['user_id']}&nbsp;&nbsp;<a href="{url('Post','Product',array('id'=>$item['id']))}" class="op">[编辑]</a>{/if}</span></div>
            <div class="clear"></div>
          </div>
          <div class="share" >
            <pre class="pdTxtEditorPre">{if $item['content']['product']}
	{if $item['content']['product']['image']}<div class="image"><a linktype="click-url" href="#" nid="{$item['content']['product']['id']}" target="_blank"><img src="{$this->data['baseurl']}images/loading.gif" u="{EncodeImg $item['content']['product']['image']}"/></a></div>{/if}
	<div class="info">
		{if $item['content']['product']['price']}<span class="price fl">价格：{$item['content']['product']['price']}</span>{/if}
		{if $item['content']['product']['seller']}<div class="seller fl"><span>{$item['content']['product']['seller']}提供本品</span></div>{/if}
		<div class="content fl">{nl2br($item['content']['content'])}</div>
	</div>
	{else}
	<div class="content">{nl2br($item['content']['content'])}</div>
	{/if}</pre>
            <div class="topic_neighbor">
              <div class="fl">同类商品:{if !empty($item['tags'])}<!--{loop $item['tags'] $tag}--><a href="{url('Post','List',array('tag'=>$tag['id']))}">{$tag['name']}</a><!--{/loop}-->{else}{/if}</div>
              <div class="buy fr"><a title="前住购买{$item['title']}" linktype="shop-click-url" href="#" nid="{$item['content']['product']['id']}" target="_blank"><img src="{$this->data['baseurl']}images/discuss_btn.png"></a></div>
            </div>
            <div class="bottom_b">
              <div class="new_reply"><a href="#reply_txtarea">围观<em>({$item['visit_num']})</em></a></div>
              分享到: <a class="kaixin share-md" href="http://www.kaixin001.com/repaste/share.php?rurl=http://{$this->data['domain']}{url('Post','View',array('id'=>$item['id']))}&amp;rcontent={urlencode($item['title'])}&amp;rtitle={urlencode($item['title'])}" target="_blank" kind="kb.activity.share.link2">开心</a><a kind="kb.activity.share.link3" class="renren share-md" href="http://share.renren.com/share/buttonshare.do?link=http://{$this->data['domain']}{url('Post','View',array('id'=>$item['id']))}&amp;title={urlencode($item['title'])}" target="_blank" id="">人人</a><a kind="kb.activity.share.link5" class="douban share-md" href="http://www.douban.com/recommend/?url=http://{$this->data['domain']}{url('Post','View',array('id'=>$item['id']))}&amp;title={urlencode($item['title'])}" target="_blank">豆瓣</a><a kind="kb.activity.share.link6" class="sina share-md" href="http://v.t.sina.com.cn/share/share.php?url=http://{$this->data['domain']}{url('Post','View',array('id'=>$item['id']))}&amp;title={urlencode($item['title'])}" target="_blank" style="margin-right: 0pt;">新浪微博</a></div>
          </div>
        </div>
      </div>
      <div class="page-sep">
        <div class="pagination"> {$this->data['pages']}</div>
      </div>
      {else} 
      <div class="clear"></div>
      <div class="reply_box">
        <div class="mainbox" {if (($mk % 2) == 1)} id="wow"{/if}>
          <div class="main_l"> <a target="_blank" href="{url('User','Index')}"><img src="{if $item['user']['logo']}{$item['user']['logo']}{else}{$this->data['baseurl']}images/avatar-120.png{/if}"></a></div>
          <div class="main_r">
            <div class="m_r_1">
              <div class="fl">{$item['username']}<b>{$mk}F</b></div>
            </div>
            <div class="m_r_2">
              <div class="share" >
                <pre class="pdTxtEditorPre">{nl2br($item['content']['content'])}</pre>
              </div>
            </div>
          </div>
          <div class="clear"></div>
        </div>
      </div>
      {/if}
      {/if} 
      <div class="clear"></div>
      {if $item['type']>0}
      {if !empty($this->data['related']['con'])}
      {ProductList(array_merge($this->data['related']['con'],array('page_no'=>1,'page_size'=>6,'keyword'=>$this->data['cf']->getRandKeyword($this->data['related']['con']['keyword']))),array('pic_url,num_iid,title'),86400,'post_view')}
      {/if}
      {if !empty($pvProductList)}
      <div class="gd_11">
        <h2 class="mt40"><a>相关推荐...</a></h2>
      <div class="clear"></div>
        <ul id="bao_list" class="gd_11 alp omg bao_list">
          <!--{loop $pvProductList $pk $item}-->
          <li>
            <div class="brand"><a title="{strip_tags($item['title'])}">{strip_tags($item['title'])}</a></div>
            <a linktype="click-url" href="#" nid="{$item['num_iid']}" target="_blank" title="{strip_tags($item['title'])}"><img src="{$this->data['baseurl']}images/loading.gif" u="{EncodeImg $item['pic_url']}_b.{$this->data['cf']->getFileExt($item['pic_url'])}" alt="{strip_tags($item['title'])}" /></a>
            <div class="price"><a>{strip_tags($item['price'])}</a></div>
          </li>
          <!--{/loop}-->
        </ul>
      </div>
      {/if}
      {/if} 
      <div id="container_mainbox"></div>
      <!--{/loop}--> 
      {/if}
      {if !empty($this->data['adList']) && !empty($this->data['adList'][15])}
 <div class="clear"></div>
    <div class="adbox mt40"> 
<!--{loop $this->data['adList'][15] $mk $item}-->
{$item['code']}
<!--{/loop}-->
</div>
{/if} 
      {if $this->data['user']['id']}
      <div id="container_mainbox">
        <div id="reply_txtarea" class="reply_txtarea">
          <form id="form" action="{url('Post','SaveComment')}" method="post">
            <div class="kindeditor">
              <div style="width:690px;" class="txtEditor_tools">
                <ul>
                  <li class="pdtxteditor_bold">文明上网,登录发言,遵守互联网公约.做个有素质的地球人!</li>
                </ul>
              </div>
              <div style="width:690px;" class="txtEditor_txtWrapper">
                <textarea name="content#content" id="txtcontent" width="90%" style="width:684px;" class="txtEditor_textarea txtEditor_textarea_mini"  onclick="if(this.value=='在这里输入点评内容'){this.value='';}">在这里输入点评内容</textarea>
              </div>
              <div id="pdTxtEditor_tips"><span etype='error_info' class="error_info" id="content#content_info"></span></div>
              <input type="hidden" name="pid" value="{$this->data['postList'][0]['id']}" />
            </div>
            <div class="re">
              <input type="image" value="" src="{$this->data['baseurl']}images/btn_submit.jpg" name="Btn_Submit" id="btnAjaxSubmit">
            </div>
          </form>
        </div>
      </div>
      {else}
      <div id="container_mainbox">
        <div id="reply_txtarea" class="reply_txtarea">
          <form>
            <div class="kindeditor">
              <div style="width:690px;" class="txtEditor_tools">
                <ul>
                  <li class="pdtxteditor_bold">文明上网,登录发言,遵守互联网公约.</li>
                </ul>
              </div>
              <div style="width:690px;" class="txtEditor_txtWrapper">
                <textarea name="content#content" id="txtcontent" width="90%" style="width:684px;" class="txtEditor_textarea txtEditor_textarea_mini"  onclick="if(this.value=='文明上网,登录发言'){this.value='';}">文明上网,登录发言</textarea>
              </div>
            </div>
            <div class="login"><a href="{url('User','Login')}"><img src="{$this->data['baseurl']}images/re_button.gif" /></a></div>
          </form>
        </div>
      </div>
      {/if} </div>
    <!--右边哦-->
    <div id="container_r"> {if $this->data['user']}
      <div id="r_box_1_l">
        <div class="header_r"></div>
        <div class="user_nav">
          <div class="top">
            <div class="top-l"><a target="_blank" href="{url('User','Order')}"><img src="{$this->data[user]['logo']}" /></a></div>
            <div class="top-r"> <a target="_blank" href="{url('User','Order')}">{$this->data['user']['username']}</a>
              <div class="clear"></div>
              <div class="txt"> <a href="{url('Post','Edit')}" class="link1"><b>发表</b></a> </div>
              <div class="txt"> <a href="{url('Post','Product')}" class="link1"><b>晒单</b></a> </div>
              <div class="txt"> <a href="{url('User','Logout')}" class="link1"><b>注销</b></a> </div>
            </div>
            <div class="clear"></div>
          </div>
          <div class="box">
            <ul>
              {if $this->data['return']['rate']>0}
              <li><a href="{url('Return','Edit')}"><span>申请返现</span></a> </li>
              <li><a href="{url('Return','Index')}"><span>返现查询</span></a> </li>
              <li class="li-last"> <a href="{url('User','Password')}"><span>修改密码</span></a> </li>
              {/if}
            </ul>
            <div class="clear"></div>
          </div>
        </div>
      </div>
      {else}
      <div id="r_box_1_l">
        <div class="header_r"></div>
        <div class="user_nav">
          <div class="top">
            <div class="top-l"><a target="_blank" href="{url('User','Login')}"><img src="{$this->data['baseurl']}images/avatar-youke.png" /></a></div>
            <div class="top-r"> <a target="_blank" href="{url('User','Login')}">游客,您好,请登录</a>
              <div class="clear"></div>
              <div class="txt"> <a href="{url('User','Login')}" class="link1"><b>登录</b></a> </div>
              <div class="txt"> <a href="{url('User','Setup')}" class="link1"><b>注册</b></a> </div>
            </div>
            <div class="clear"></div>
          </div>
          <div class="box">
            <ul>
              <li class="li-last">注册为会员,有更多精彩! </li>
            </ul>
            <div class="clear"></div>
          </div>
        </div>
      </div>
      {/if}
      {PostList(array('type'=>1,'status'=>1),'visit_num DESC,last_updated DESC',0,21,'id,username,title,visit_num',0,'site_index')}
      {if !empty($pvPostList)}
      <div class="content-bottom-r-3">
        <div class="content-bottom-r-31">
          <h3>热门主题</h3>
        </div>
        <div class="clear"></div>
        <div class="content-bottom-r-32">
          <ul>
            <!--{loop $pvPostList['rows'] $k $item}--> 
            <li {if $k<4}class="k_no{$k+1}"{else}class="k_no0"{/if}><a target="_blank" title="{$item['title']}" href="{url('Post','View',array('id'=>$item['id']))}">{$item['title']}...</a>
            </li>
            <!--{/loop}-->
          </ul>
        </div>
      </div>
      {/if} 
      <!-- 广告290*85 -->
        {if !empty($this->data['adList']) && !empty($this->data['adList'][30])}
        <div class="clear"></div>
    <div class="adbox mt40"> 
  <h3>广告商提供链接...</h3>
<!--{loop $this->data['adList'][30] $mk $item}-->
{$item['code']}
<!--{/loop}-->
</div>
 <div class="clear"></div>
{/if}
      {PostList(array('type'=>2,'status'=>1),'visit_num DESC,last_updated DESC',0,21,'id,username,title,visit_num',0,'site_index')}
      {if !empty($pvPostList)}
      <div class="content-bottom-r-3">
        <div class="content-bottom-r-31">
          <h3>热门分享</h3>
        </div>
        <div class="clear"></div>
        <div class="content-bottom-r-32">
          <ul>
            <!--{loop $pvPostList['rows'] $k $item}--> 
            <li {if $k<4}class="k_no{$k+1}"{else}class="k_no0"{/if}><a target="_blank" title="{$item['title']}" href="{url('Post','View',array('id'=>$item['id']))}">{$item['title']}...</a>
            </li>
            <!--{/loop}-->
          </ul>
        </div>
      </div>
      {/if}
      {if !empty($this->data['adList']) && !empty($this->data['adList'][31])}
      <div class="clear"></div>
    <div class="adbox mt40"> 
  <h3>广告商提供链接...</h3>
<!--{loop $this->data['adList'][31] $mk $item}-->
{$item['code']}
<!--{/loop}-->
</div>
 <div class="clear"></div>
{/if} 
      </div>
    <div class="clear"></div>
  </div>
</div>
<div class="clear"></div>
<script language="javascript">
var defaultClickUrl	= "{$this->data['clickUrl']}";
replaceLink();
replaceImage();
</script>